<?php

namespace Medicina\BackendBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use Medicina\KernelBundle\Entity\PersonaAsesora;

class PersonaAsesoraType extends AbstractType {

    public function buildForm(FormBuilder $builder, array $options) {
        $builder
                ->add('tipoAsesor', 'choice', array(
                    'choices' => PersonaAsesora::getTiposAsesor(),
                    'label' => 'Tipo de Asesor'
                ))
                ->add('persona', 'entity', array('class' => 'Medicina\KernelBundle\Entity\Persona',  'label' => 'Asesor', 'attr' => array('class' => 'select_asesor')));

        ;
    }

    public function getDefaultOptions(array $options) {
        return array('data_class' => 'Medicina\KernelBundle\Entity\PersonaAsesora');
    }

    public function getName() {
        return 'PersonaAsesoraType';
    }

}

?>
